package com.isunland.managesystem.ui;

import android.support.v4.app.Fragment;
import com.isunland.managesystem.R;
import com.isunland.managesystem.entity.EmployeeLoanContent;

public class TravelReimburseActivity extends TableHeaderPagerActivity {
  public static final String EXTRA_TYPE = "com.isunland.managesystem.ui.EXTRA_TYPE";

  //	// 判断是差旅详情
  //	public static final int EXTRA_SHOWCONTENTTYPE = 0;
  //	// 判断是差旅详情
  //	public static final int EXTRA_ADDCONTENTTYPE =1;

  //	private int[] titles={R.string.travelReimburse,R.string.travelReimburseList};
  private int[] titles = { R.string.reimburseDetail, R.string.reimburseList };
  private EmployeeLoanContent mContent;

  //差旅费用报销申请界面
  @Override protected Fragment createFragmentOne() {
    mContent = (EmployeeLoanContent) getIntent().getSerializableExtra(
        TravelReimburseDetailFragment.EXTRA_TRAVELREIMBURSE_CONTENT);
    return TravelReimburseDetailFragment.newInstance(mContent);
  }

  //差旅费用报销明细界面list
  @Override protected Fragment createFragmentTwo() {
    mContent = (EmployeeLoanContent) getIntent().getSerializableExtra(
        TravelReimburseDetailFragment.EXTRA_TRAVELREIMBURSE_CONTENT);
    return TravelReimburseListFragment.newInstance(mContent);
  }

  @Override protected int[] createTitle() {

    return titles;
  }

  @Override public int getHeaderPosition() {
    return 1;
  }
}
